/*
 * Copyright (C) Francisco Morero Peyrona. All rights reserved.
 *
 * This software is published under the terms of Open Source
 * License version 1.1, a copy of which has been included with this
 * distribution in the License.txt file.
 */

package jdbcmanager.swing.help;

import java.io.*;
import javax.swing.*;

/**
 * Shows About panel contents.
 * 
 * @author Francisco Morero Peyrona
 */
final class AboutPanel extends JScrollPane
{
   private JEditorPane htmlViewer = new JEditorPane();
   
   public AboutPanel()
   {
      this.htmlViewer.setContentType( "text/html" );
      this.htmlViewer.setEditable( false );
      
      setViewportView( this.htmlViewer );

      try
      {
         // By default pages are loaded asynchronously: perfect.
         this.htmlViewer.setPage( "file:help/about.html" );
      }
      catch( IOException exc )
      {
         this.htmlViewer.setText( "<html><body>File <b>about.html</b> not found</body></html>" );
      }
   }
}